This invention relates to image generators such as those used in aircraft flight simulators for pilot training and in particular to methods and apparatus for incorporating contour texture maps in such image generators.
A critical component of flight simulators has been the image generator. Image generators display visual cues on a screen so that realistic visual images can be viewed by an observer from a viewpoint. Obviously, the visual cues projected by the image generator are most useful when they correlate directly with the real world.
The visual cues are generated by modeling real world counterparts and storing the models in the memory of the image generator. In general, the modeling occurs by dividing the scene to be modeled into polygons which are then combined to create the visual cues. Although even the smallest details can be modeled using polygons, the complexity of the model would result in enormous memory and computational requirements which would make real time systems impossible with currently available technology. Texture maps have been found to be an efficient alternative method of increasing scene complexity and hence realism. Indeed, the inclusion of texture into real time system has had a significant effect on both realism and optical flow.
In general, texture maps are maps which store a predefined irregular coloring, pattern or other predefined feature which is overlaid on a predefined polygon. The combination of the polygon and overlaid texture map then forms a composite which is displayed, pixel by pixel, on a typical video monitor. If the polygon is larger than the texture pattern being mapped onto it, the pattern simply repeats. If the polygon is smaller, the texture pattern is clipped.
There are a variety of techniques which might be used in a real time image generator to produce texture. One method consists of computing a texture pattern on the fly as a polygon is rendered and applying the pattern to the individual pixels affected by the polygon. Such a texture pattern is typically an evaluation of one or more mathematical functions such as a sum of sine waves of varying frequency and direction.
Another way of producing texture is through the use of texture maps. A texture map is a two-dimensional array of texture values. The map is computed off-line and then stored in a texture map memory in the image generator. As a textured polygon is rendered, an address into the texture map is calculated for each pixel affected by the polygon. The texture value or "texel" associated with a particular pixel is then used to modify the final intensity or color of the pixel. This method of producing texture requires more memory than the first method, but provides increased flexibility in that the texture patterns are independent of the image generator hardware.
Texture patterns when applied to a polygon surface, modify or modulate some attribute of that surface. The modulation of each attribute will result in a different effect on the screen. Consequently, texture maps have been used to modulate the intensity of the polygon to portray surface roughness or change of the reflectivity of the polygon. Texture maps can also modulate the color of the polygon. For example, a polygon with areas of green and brown created by texture could represent patches of grass or dirt. Still another attribute of the polygon which can be modified by a texture map is its transparency. A texture map affecting transparency can be used to create opaque and translucent areas on the polygon to display features such as smoke or clouds.
Recent developments have made use of transparency texture to modify the shape of polygons. Such maps may be viewed as a "cookie cutter" to remove portions of the polygon allowing complex shapes to be cut.
Traditional methods of creating and storing texture maps required direct storage of the transparency, color or intensity value for each texel. However, this traditional texture map method is inadequate for portraying hard edge boundaries such as occur in contour texture maps over a wide dynamic range of image sizes. For example, when the image mapped is small, the edges either scintillate or the object to e created by the contour map would have to be prematurely removed from being displayed. Consequently, the present invention provides a new type of contour texture map. Instead of storing color, intensity or transparency data directly, a contour map in accordance with the present invention consists of spacial distances from each map texel to the boundary between, for example, an opaque and transparent area. A flag such as a positive or negative sign associated with each spacial distance, indicates whether the texel is in, e.g. an opaque or transparency area. The present invention computes the proper transparency (or alternatively color or intensity) values for the contour maps from the encoded spatial boundary data, taking into account the polygon's distance and slant angle.